package com.lyq.org.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.lyq.basic.domain.BaseDomain;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * @Author:liangyunqian
 * @Date: 2022/12/8  12:47
 * @Description:
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
public class Department extends BaseDomain {

    @ApiModelProperty("名字")
    private String name;
    private String intro;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date create_time;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date update_time;
    private Long manager_id;
    private Long parent_id;
    private String path;
    private Integer state;
    //部门经理 多对一
    private Employee manager;
    //父部门 多对一
    private Department parent;
    //子部门 一对多
    private List<Department> children;


}
